import request from '@/utils/request'
import type { IResponse } from './type'
const baseUrl = '/user'

// 登录

export const login = (data: object): Promise<IResponse> =>
  request({
    url: `${baseUrl}/login`,
    method: 'post',
    data,
  })
// 用户信息
export const getUserInfo = (): Promise<IResponse> =>
  request({
    url: `${baseUrl}/getUserInfo`,
    method: 'get',
  })
